package com.kish.web;

import com.kish.dao.UserDao;
import com.kish.domain.User;
import com.kish.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo01 {
    public static void main(String[] args) {
       /* System.out.println("spring start");
        UserService userService = new UserServiceImpl();
        userService.save(new User());*/
//        UserDao userDao = new UserDaoImpl();
//        userDao.addUser(new User());

        /*ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        System.out.println("getBean before");
        UserDao userDao = (UserDao) applicationContext.getBean("userDao");
        System.out.println("getBean after");
        userDao.addUser(new User());

        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.save(new User());*/
    }
}
